/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-07-22
*/
package com.rzico.basics.service;

import com.rzico.base.BaseMapper;
import com.rzico.base.impl.BaseServiceImpl;
import com.rzico.basics.entity.BomItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzico.basics.mapper.BomItemMapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <pre>
 * 商品清单项业务类
 * </pre>
 *
 * @author Rzico Boot
 * @version 1.0
 */
@Service
public class BomItemService extends BaseServiceImpl<BomItem, String> {

    @Autowired
    private BomItemMapper bomItemMapper;

    @Override
    public BaseMapper<BomItem, String> getMapper() {
        return bomItemMapper;
    }

    public List<BomItem> getItemList(Long bomId) {
        Map<String,Object> params = new HashMap<>();
        params.put("bomId",bomId);
        return bomItemMapper.selectList(params);
    }


    public List<BomItem> getItemList(Long bomId,String groupId) {
        Map<String,Object> params = new HashMap<>();
        params.put("bomId",bomId);
        params.put("groupId",groupId);
        return bomItemMapper.selectList(params);
    }

    public int deleteList(Map<String, Object> params) {
        return bomItemMapper.deleteList(params);
    }


}
